<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="format-detection" content="telephone=no,email=no"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="flexible" content="initial-dpr=2" />
    <title>报价结果</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/result.css">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
</head>
<body>
    <div class="content">
        <p class="p1">您家的装修预估报价</p>
        <div class="information">
            <p class="line">
                <span class="city">厦门</span>
                <span class="acreage">120㎡</span>
                <span class="fang">3室2厅2卫1阳台</span>
                <span class="newti">新房装修</span>
            </p>
            <div class="panel">
                <div class="pad-all">
                    <div id="mapshow" style="height: 300px"></div>
                </div>

                <p class="pws line-t">13130</p>
                <p class="pwt line-t">8200</p>
            </div>
            <!--<p class="sums">130元</p>-->
            <div class="diresribe">
                <p>*稍后装修管家将致电您，为您提供免费的装修咨询服务</p>
                <p>*因材料品牌各工程量不同，具体报价以量实测为准</p>
            </div>
            <button class="wanshan">完善信息，获取有限资格</button>
        </div>
    </div>
</body>
<div class="mask"></div>
<div class="alertcon">
    <div class="main">
        <form action="">
            <div class="img">
                <img src="img/close.png" alt="" class="closet">
            </div>
            <p class="title">完善装修信息，获取优先咨询</p>

            <ul class="list">
                <li>
                    <p>1.您房子装修的时间是？</p>
                    <div class="buts chodata">
                        <button type="button">0~30天</button>
                        <button type="button">30~60天</button>
                        <button type="button">60天以上</button>
                    </div>
                </li>
                <li>
                    <p>2.您房子装修的装修预算是？</p>
                    <div class="buts choprice">
                        <button type="button">5万以内</button>
                        <button type="button">5~10万</button>
                        <button type="button">10~15万</button>
                        <button type="button">15~20万</button>
                        <button type="button">20~30万</button>
                        <button type="button">30万以上</button>
                    </div>
                </li>
                <li>
                    <p>3.您希望的装修方式是？</p>
                    <div class="buts chosethod">
                        <button type="button">半包</button>
                        <button type="button">全包</button>
                    </div>
                </li>
                <li>
                    <p>3.您所在的小区是？</p>
                    <div class="alear">
                        <input type="text" placeholder="请输入您要装修房屋的小区的名称">
                        <img src="img/inputclose.png" alt="">
                    </div>
                </li>
            </ul>
            <button class="confirm" type="button">确认提交</button>
        </form>

    </div>
</div>
<div class="success">
    <img src="img/ture.jpg" alt="">
</div>
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/dialog.min.js"></script>
<script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/echarts.min.js"></script>
<script src="js/result.js"></script>
<script>

  $(function(){


    $(".wanshan").click(function(){
        $(".mask").show();
        $('.alertcon').show();
    })

      //鼠标按下时，后面删除按钮显示
      $(".alear input").keyup(function(){
          $(this).siblings().show();
      })

      $('.alear img').click(function(){
          $(".alear input").val('');
          var s = $(".alear input").val()
          if(s==''){
              $('.alear img').hide();
          }else {
              $('.alear img').show();
          }
      })

      $('.closet').click(function () {
          $(".mask").hide();
          $('.alertcon').hide();
      })

      $('.list li .buts button').click(function(){
          $(this).addClass('buttons').siblings().removeClass('buttons');
          console.log($(this).text())
      })

      //循环遍历选中的值
      $(".confirm").click(function(){
         var arr = [];
          $.each($(".list li .buts .buttons"),function(i,o) {
              arr.push($(o).text());
          })
          var s =$(".list li .alear input").val();
          console.log(s)
          arr.push(s)
          console.log(arr)
          var connect = $(".list li .buts .buttons").text();
          if((s && connect) == ''){
              alert("请填写完整")
              return false
          }else{
              $(".mask").hide();
              $('.alertcon').hide();

              $(".success").show();
              setTimeout(function() {
                  $(".success").hide();
              },2000);
              $(".wanshan").hide();
              return true;
          }
      })

  })
</script>
</html>